<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<table class="display" id="example">
    <thead>
    <tr>
        <th>选择</th>
        <th>部门</th>
        <th>岗位</th>
        <th>编制人数</th>
        <th>实际在职人数</th>
        <th>考核指标设定状态</th>
        <th>操作</th>
        <th>条目数</th>
    </tr>
    </thead>
    <tbody>
    <s:if test="#request.examItemSetPojos==null || #request.examItemSetPojos.size<=0">
        <tr class="gradeA">
            <td colspan="8">暂无数据</td>
        </tr>
    </s:if>
    <s:else>
        <s:iterator var="item" status="sta" value="#request.examItemSetPojos">
            <s:if test="#sta.even">
                <tr class="gradeA">
            </s:if><s:else><tr class="gradeC"></s:else>
            <td><input type="checkbox" name="check_item" value="${item.id}"/></td>
            <td>${item.duty.organization.fullName}</td>
            <td>${item.duty.dutyName}</td>
            <td>${item.duty.organization.employeeCount}</td>
            <td>--</td>
            <td>
                <s:if test="#request.item.id!=null">
                    <div id="progress1" class="progress">
                        <span style="width: ${item.pState}%;"><b>${item.pState}%</b></span>
                    </div>
                </s:if>
                <s:else>尚未设置</s:else>
            </td>
            <td>
            <s:if test="#request.item.id!=null or #request.item.id>0">
                 <span style="width:12%">
                     <s:if test="#request.item.state <= 0">
                     <a class="button" href="javascript:void(0)" style="color: #777777;">
                         <span style="background:url(${ctx}/images/img/page_edit.png);" class="icon">&nbsp;</span>设置</a>
                     </s:if>
                     <s:else>
                     <a class="button" href="#exam/itemset_setup_main.xhtml?organizationId=${organizationId}&examQuanSet.duty.id=${item.duty.id}&examQuanSet.id=${item.id}&t=<%=new java.util.Date().getTime()%>">
                         <span style="background:url(${ctx}/images/img/page_edit.png)" class="icon">&nbsp;</span>设置</a></span>
                     </s:else>
            </s:if>
            </td>

            <td>${item.itemCount}</td>
            </tr>
        </s:iterator>
    </s:else>

    </tbody>
</table>

<p>
    <%@ include file="/WEB-INF/pages/common/main_orgtab_pager.jsp" %>
</p>